// Primitive.h-  This is the base object of all objects in 
// the scene graph.
//////////////////////////////////////////////////////////////////////

#if !defined PRIMITIVE_H
#define PRIMITIVE_H

#include "SceneObject.h"
#include "Material.h"
#include "Texture.h"
#include "Vec3.h"

enum PRIMITIVE_TYPE
{
     SPHERE,
     CUBE
};

class Primitive : public SceneObject
{
private:
    PRIMITIVE_TYPE type;
    float size;
    float divisions;
    Material *material;
    Texture *texture;    

public:
	Primitive(PRIMITIVE_TYPE, float, float);
	virtual ~Primitive();

	virtual RTTI_OBJECT_TYPE getType() const { return RTTI_PRIMITIVE; }
    virtual Material* getMaterial() { return material; }
    virtual Texture* getTexture() { return texture; }
    virtual void setTexture(Texture *t) { texture = t; }
    
	// Force every child to have a render and update methods
	virtual void render(float timeElapsed);
	virtual void update(float timeElapsed);
	

protected:
    virtual void drawSphere();
    virtual void drawCube();

};

#endif // PRIMITIVE_H
